package org.chenjian.portal80.controller;


import org.chenjian.portal80.service.CarService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;

@Controller
public class CarController {
    @Autowired
    CarService carService;
    @GetMapping("/cartable")
    public String getCarInfo(Model model){
        model.addAttribute("cars",carService.getAllCar());
        return "tables";
    }
}
